package github.saw96x.registry;

import github.saw96x.common.extension.SPI;
import github.saw96x.remoting.pojo.RpcRequest;

import java.net.InetSocketAddress;

/**
 * @author Saw96x
 * @date 2022/3/18 9:02
 */
@SPI
public interface ServiceDiscovery {
  /**
   * lookup service by rpcServiceName
   *
   * @param rpcRequest rpc service pojo
   * @return service address
   */
  InetSocketAddress lookupService(RpcRequest rpcRequest);
}
